package cn.tiancaifan.micro.service;


import cn.tiancaifan.micro.entity.Level;
import cn.tiancaifan.micro.mapper.LevelMapper;
import cn.tiancaifan.micro.utils.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LevelService {

    @Autowired
    LevelMapper mapper;

    public List<Level> getLevels() {
        List<Level> levels = mapper.getLevels();
        return levels;
    }
    @Logger("添加职位等级")
    public int addLevel(Level level) {
        return mapper.addLevel(level);
    }

    @Logger("删除职位等级")
    public int deleteLevel(Integer id) {
        return mapper.deleteLevelById(id);
    }
}
